1. Field of the Invention
The invention is related to the field of disk drive systems, and in particular to disk drive systems and circuitry that encode and decode data using a modulo code for error checking.
2. Statement of the Problem
FIG. 1 shows a conventional disk drive system 100. The disk drive system 100 includes a disk device 102 connected to control circuitry 106. The disk device 102 includes storage media 104 that stores data. Some examples of the storage media 104 are magnetic and optical disks. The control circuitry 106 includes a read channel circuit 120 and a write channel circuit 140. The write channel circuit 140 transfers signals to the disk device 102 to store data. The read channel circuit 120 processes signals from the disk device 102 to reproduce the stored data. The write channel circuit 140 includes an encoder 142, a write compensation circuit 144, and an interface 146 all connected in series. The read channel circuit 120 includes a sampling circuit 122, an adaptive filter 124, an interpolated timing recovery (I.T.R.) circuit 126, a detector 128, and a decoder 130 all connected in series.
If the storage media 104 is a magnetic disk, then the data is exchanged with the magnetic disk as follows. The write channel circuit 140 generates a write signal 111 representing user data 141. The write signal 111 drives a magnetic head in the disk device 102. The magnetic head alters a magnetic field to create magnetic transitions on the magnetic disk. These magnetic transitions represent the data. The head subsequently detects the magnetic transitions to generate a read signal 110 that represents the magnetic transitions. The read channel circuit 120 processes the read signal 110 to produce a data signal 131 that represents the data.
If the storage media 104 is an optical disk, then the data is exchanged with the optical disk as follows. The write channel circuit 140 generates a write signal 111 representing the user data 141. The write signal 111 drives a device that creates pits in the surface of the optical disk. The pits create physical transitions that represent the data. An optical pick-up projects a laser onto the surface of the disk and detects the reflection to generate the read signal 110 that represents the physical transitions. The read channel circuit 120 processes the read signal 110 to produce the data signal 131 that represents the data.
To read or write the data, the magnetic head or optical pick-up must first be positioned over a certain track. To facilitate this positioning, servo information that identifies various locations on the disk is stored on the disk at the corresponding locations. The read signal 110 includes this servo information. The control circuitry 106 processes the servo information to control the positioning of the disk device 102.
The write channel circuit 140 operates as follows to store data on the disk device 102. The encoder 142 receives the user data 141. The encoder 142 encodes the user data 141 so that error-checking functions can be performed on the user data 141 when it is subsequently decoded. The encoder 142 transfers a digital signal 143 representing the encoded user data 141 to the write compensation circuit 144. The write compensation circuit 144 receives the digital signal 143 and adjusts the timing of the transitions in the digital signal 143. The write compensation circuit 144 transfers the digital signal 143 to the interface 146. The interface 146 receives the digital signal 143 and converts from digital to analog to form the write signal 111. The interface 146 transfers the write signal 111 to the disk device 102.
The read channel circuit 120 operates as follows to convert the read signal 110 into the data signal 131. The sampling circuit 122 converts the read signal 110 from analog to digital by sampling the read signal 110 to generate read samples 123 for the adaptive filter 124. The adaptive filter 124 removes distortion by shaping the read samples 123 to generate equalized samples 125 for the I.T.R. circuit 126. The J.T.R. circuit 126 synchronizes the equalized samples 125 with the detector 128 clock by interpolating the equalized samples 125 at the detector 128 clock pulses to generate interpolated samples 127. The detector 128 converts the interpolated samples 127 into an encoded bit stream 129 by processing the interpolated samples 127 with a detection algorithm, such as a Viterbi state machine. The decoder 130 decodes the encoded bit stream 129 into the data signal 131 by applying a decoding technique, such as PR4 with D=1 constraints. The decoder 130 also performs error-checking functions on the data signal 131.
FIG. 2 illustrates how the encoder 142 encodes the user data 141. The encoder 142 separates the user data 141 into blocks, including a first data block 210, and a second data block 220. The encoder 142 inserts first stuff bits 231-232 between the first data block 210 and the second data block 220. The first stuff bits 231-232 are stripped out when the user data 141 is later decoded.
FIG. 3 shows a logical table that illustrates how the encoder 142 determines the values to insert into the first stuff bits 231-232. The encoder 142 utilizes non-return to zero invertive (NRZI) transition encoding, meaning that the presence or absence of a transition in the data signifies a bit. The encoder 142 maintains a D=1 constraint when encoding, meaning that at least one zero is required between consecutive ones. The encoder 142 looks at the last bit 211 of the first data block 210 and the first bit 221 of the second data block 220 when determining the values to insert into the first stuff bits 231-232. When the last bit 211 is a xe2x80x9c0xe2x80x9d and the first bit 221 is a xe2x80x9c0xe2x80x9d, the encoder 142 inserts a xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d for the first stuff bits 231-232 so as to maintain the D=1 constraint. When the last bit 211 is a xe2x80x9c1xe2x80x9d and the first bit 221 is a xe2x80x9c0xe2x80x9d, the encoder 142 inserts a xe2x80x9c0xe2x80x9d for stuff bit 231. The encoder 142 inserts a parity value for stuff bit 232. The parity value is commonly the parity of either the even or odd NRZI bits of the first data block 210. Parity checking such as this is well known in the art. When the last bit 211 is a xe2x80x9c0xe2x80x9d and the first bit 221 is a xe2x80x9c1xe2x80x9d, the encoder 142 inserts a parity value for stuff bit 231. The parity value is commonly the parity of either the even or odd NRZI bits of the first data block 210. The encoder 142 inserts a xe2x80x9c0xe2x80x9d for stuff bit 232.
The decoder 130 checks for errors in the encoded bit stream 129 by using a parity check. The encoded bit stream 129 represents a third data block and second stuff bits. The decoder 130 starts by checking the parity of the third data block. The parity check commonly takes place over the even or odd NRZI bits of the third data block. The decoder 130 detects errors by comparing the parity of the third data block with the parity value inserted in the second stuff bits. If the parity values are the same, then no error is detected. If the parity values are different, then an error is detected. The same parity check takes place over all data blocks.
The problem with the current disk drive system 100 is that it provides insufficient error detection. The current detector 128 commonly produces bit shift errors in the process of converting the read signal 110 into the data signal 131. The error-checking method in the prior art often does not detect the bit-shift errors and fails to detect other types of errors. Reliability of the disk drive system 100 needs to be improved.
The invention solves the above problem by providing error detection using a modulo code. The modulo code allows the disk drive system to detect bit shifts and other errors that may not be detected by the prior systems. The improved error detection makes for a more reliable disk drive system.
The disk drive system includes a disk device coupled to control circuitry. The control circuitry encodes data using a modulo code. The control circuitry separates the data into blocks and encodes the data by inserting stuff bits between blocks according to the modulo code. The control circuitry converts the encoded data into a write signal and transfers the write signal to the disk device. The control circuitry also receives a read signal from the disk device and converts the read signal into a data signal. The data signal represents blocks of data separated by stuff bits. The control circuitry detects errors in a block of data by determining the modulo value of the block of data and the following stuff bits.